{{ define "content" }}
{{  $data := (where (where .Site.Pages "Section" "posts") "IsPage" true) }}
<article class="content article article-archives article-type-list" itemscope="">
  <header class="article-header">
    <h1 itemprop="name" class="hidden-xs">归档</h1>
    <p class="hidden-xs">共 {{ len $data }} 篇文章</p>
  </header>

  <div class="article-body">
    {{ range $data.GroupByDate "2006-01" }}
      <div class="panel panel-default b-no">
      <div class="panel-heading" role="tab">
          <h4 class="panel-title">
          <a data-toggle="collapse" href="#collapse{{ .Key }}" aria-expanded="true">
              <i class="icon icon-calendar-plus text-active"></i><i class="icon icon-calendar-minus text"></i>
              {{ .Key }}
          </a>
          <small class="text-muted">(Total  {{ len .Pages }} articles)</small>
          </h4>
      </div>
      <div id="collapse{{ .Key }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{ .Key }}">
          <div class="panel-body">
          <div class="collection">
              {{ range .Pages }}
              <a href="{{ .URL }}" class="collection-item" target="_blank" itemprop="url">
                      <time>{{.Date.Format  "2006-01-02" }}</time>
                      <span>&nbsp;&nbsp;&nbsp;</span>{{ .Title }}
                  </a>
              {{ end }}
          </div>
          </div>
      </div>
      </div>
      {{ end }}
  </div>
</article>
{{ end }}